package cn.com.homeyoda.aimate.aihealth.ui.problem;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import cn.com.homeyoda.aimate.aihealth.R;
import com.wzq.mvvmsmart.utils.GlideLoadUtils;

import java.io.File;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * Created By 刘纯贵
 * Created Time 2020/4/30
 */
public class CameraAdapter extends BaseQuickAdapter<File, BaseViewHolder> {

    private Context mContext;
    public CameraAdapter(int layoutResId, @Nullable List<File> data, Context context) {
        super(layoutResId, data);
        mContext = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, File item) {

    }

    @Override
    public void onBindViewHolder(BaseViewHolder holder, int position) {
        super.onBindViewHolder(holder, position);

        Bitmap bitmap = BitmapFactory.decodeFile(getData().get(position).getAbsolutePath());
        holder.setImageBitmap(R.id.user_head,bitmap);
        holder.addOnClickListener(R.id.delete);
    }



    @Override
    public void setNewData(@Nullable List<File> data) {
        super.setNewData(data);
    }
}
